// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import Vue from 'vue'
import App from './App'
import router from './router'
import axios from 'axios'
import {post,fetch,patch,put} from './utils/http'
import store from './store/store'
// import Vant from 'vant';
// import 'vant/lib/index.css';
// Vue.use(Vant);
import ElementUI from 'element-ui';
import 'element-ui/lib/theme-chalk/index.css';
Vue.use(ElementUI);


// 引用样式表
import '@/assets/css/base_rem.css';//初始化样式表
import '@/assets/css/demo.css';//初始化样式表
import '@/assets/js/common_rem.js';//引用 rem 布局设置
import commonFunc from '@/assets/js/common.js';//引用公共函数
// import 'vant/lib/index.css';
// Vue.use(commonFunc);
Vue.prototype.$commonFunc=commonFunc;

// 获取固定密码
import password from '@/assets/js/password.js';
Vue.prototype.$password = password;

Vue.config.productionTip = false;
//定义全局变量
Vue.prototype.$post=post;
Vue.prototype.$fetch=fetch;
Vue.prototype.$patch=patch;
Vue.prototype.$put=put;

// this.$post("payment",{
//   userId:sessionStorage.getItem("userId"),
// }).then(res=>{
//   console.log(res)
// })

Vue.prototype.axios = axios;


new Vue({
  el: '#app',
  router,
  store,
  components: { App },
  template: '<App/>'
})
